package com.wgts.wgts.dagger.module;


import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IWriteInvitationCodeActivityModel;
import com.wgts.wgts.mvp.model.imp.WriteInvitationCodeActivityModel;
import com.wgts.wgts.mvp.presenter.IWriteInvitationCodeActivityPersenter;
import com.wgts.wgts.mvp.presenter.imp.WriteInvitationCodeActivityPersenter;
import com.wgts.wgts.mvp.view.IWriteInvitationCodeActivityView;
import com.wgts.wgts.netmodle.NetService;
import com.wgts.wgts.tools.SharedpreferencesHelper;

import dagger.Module;
import dagger.Provides;

@Module
public class WriteInvitationCodeActivityModule {

    private IWriteInvitationCodeActivityView view;

    public WriteInvitationCodeActivityModule(IWriteInvitationCodeActivityView view) {
        this.view = view;
    }

    @Provides
    @ActivityScope
    public IWriteInvitationCodeActivityView provideView(){
        return view;
    }

    @ActivityScope
    @Provides
    public IWriteInvitationCodeActivityModel provideModle(NetService netService, SharedpreferencesHelper sharedpreferencesHelper){
        return new WriteInvitationCodeActivityModel(netService, sharedpreferencesHelper);
    }

    @ActivityScope
    @Provides
    public IWriteInvitationCodeActivityPersenter providePersenter(IWriteInvitationCodeActivityModel model, IWriteInvitationCodeActivityView view){
        return new WriteInvitationCodeActivityPersenter(model, view);
    }
}
